package service;

import java.util.List;

import dao.FolderDao;

import entity.Folder;

public class FolderService {

	private FolderDao fd = new FolderDao();
	public List<Folder> findByProjectId(int id) {
		return fd.findByprojectId(id);
	}

	public void addFolder(Folder folder) {
		fd.addFolder(folder);
		
	}

	public void delFolder(int id) {
		FileService fileService = new FileService();
		fileService.delByFolderID(id);
		fd.delFolder(id);
	}
	
	public Folder findById(int id) {
	    return fd.findById(id);
	}
	
}
